Set toolchain clang linker to gold (Linux)#73463
Conversation
|
@swift-ci please test |
|
@swift-ci please test Linux toolchain |
|
swiftlang/swift-driver#1596 |
compnerd
left a comment
There was a problem hiding this comment.
Yeah, that is a long standing issue with BFD and our usage of protected symbols.
75f657d to
ec74b91
Compare
|
swiftlang/swift-driver#1608 |
|
swiftlang/llvm-project#8748 |
1 similar comment
|
swiftlang/llvm-project#8748 |
ec74b91 to
6098d98
Compare
|
swiftlang/llvm-project#8748 |
|
IT'S FINALLY GREEN ON LINUX! 😆 |
|
swiftlang/llvm-project#8748 |
|
swiftlang/llvm-project#8748 |
|
swiftlang/llvm-project#8748 |
The just-built Swift driver was picking up the system clang, which would try to use the bfd linker instead of gold or lld. bfd doesn't like how Swift handles protected symbols and fails with the following error: ``` error: link command failed with exit code 1 (use -v to see invocation) /usr/bin/ld: /home/build-user/build/buildbot_linux/libdispatch-linux-x86_64/src/swift/CMakeFiles/swiftDispatch.dir/Block.swift.o: relocation R_X86_64_PC32 against protected symbol `$s8Dispatch0A13WorkItemFlagsVSYAAMc' can not be used when making a shared object /usr/bin/ld: final link failed: bad value ``` This patch tells the Swift-Driver where it should find its clang, and makes it match the clang that is in use through the rest of the build.
BFD doesn't work with Swift symbols. We get nasty errors like this: ``` error: link command failed with exit code 1 (use -v to see invocation) /usr/bin/ld: ...wift/CMakeFiles/swiftDispatch.dir/Block.swift.o: relocation R_X86_64_PC32 against protected symbol `$s8Dispatch0A13WorkItemFlagsVSYAAMc' can not be used when making a shared object /usr/bin/ld: final link failed: bad value ```
6098d98 to
d63152f
Compare
|
swiftlang/llvm-project#8748 |
2 similar comments
|
swiftlang/llvm-project#8748 |
|
swiftlang/llvm-project#8748 |
|
swiftlang/llvm-project#8748 |
|
swiftlang/llvm-project#8748 |
BFD doesn't work with Swift symbols. We get nasty errors like this:
rdar://123061492